package com.fdb.efp.nls.service.impl.psd.credit;

import com.fdb.efp.nls.service.domain.psd.NlsCreditApprovalInfo;
import com.fdb.efp.nls.service.facade.psd.NlsCreditApprovalInfoService;
import com.fdb.efp.nls.service.vo.psd.NlsCreditApprovalInfoVO;
import com.fdb.basic.framework.core.base.FrameworkService;
import com.fdb.efp.nls.service.dao.psd.NlsCreditApprovalInfoDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("nlsCreditApprovalInfoService")
public class NlsCreditApprovalInfoServiceImpl implements NlsCreditApprovalInfoService, FrameworkService {

    @Autowired
    private NlsCreditApprovalInfoDAO nlsCreditApprovalInfoDAO;

    @Override
    public int deleteByPrimaryKey(String lmtApplySeq) {
        return nlsCreditApprovalInfoDAO.deleteByPrimaryKey(lmtApplySeq);
    }

    @Override
    public int insert(NlsCreditApprovalInfoVO record) {
        return nlsCreditApprovalInfoDAO.insert(beanCopy(record, new NlsCreditApprovalInfo()));
    }

    @Override
    public int insertSelective(NlsCreditApprovalInfoVO record) {
        return nlsCreditApprovalInfoDAO.insertSelective(beanCopy(record, new NlsCreditApprovalInfo()));

    }

    @Override
    public NlsCreditApprovalInfoVO selectByPrimaryKey(String lmtApplySeq) {
        return beanCopy(nlsCreditApprovalInfoDAO.selectByPrimaryKey(lmtApplySeq),new NlsCreditApprovalInfoVO());
    }

    @Override
    public NlsCreditApprovalInfoVO selectByChannelApplyNo(String channelApplyNo) {
        return beanCopy(nlsCreditApprovalInfoDAO.selectByChannelApplyNo(channelApplyNo),new NlsCreditApprovalInfoVO());

    }

    @Override
    public int updateByPrimaryKeySelective(NlsCreditApprovalInfoVO record) {
        return nlsCreditApprovalInfoDAO.updateByPrimaryKeySelective(beanCopy(record, new NlsCreditApprovalInfo()));

    }

    @Override
    public int updateByPrimaryKey(NlsCreditApprovalInfoVO record) {
        return nlsCreditApprovalInfoDAO.updateByPrimaryKey(beanCopy(record, new NlsCreditApprovalInfo()));

    }

    @Override
    public List<NlsCreditApprovalInfoVO> getNotSendMsgToTaxRecord() throws Exception {
        return (List<NlsCreditApprovalInfoVO>) beansCopy(nlsCreditApprovalInfoDAO.getNotSendMsgToTaxRecord(),NlsCreditApprovalInfoVO.class);
    }
}
